//File: SimpleBreshenhamTest.java
//Purpose:  A window that tiems line draws using SimpleBreshenham

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class GridTest extends JFrame {
    GridCanvas myCanvas;
    TextField status;
    
	public GridTest(LineDrawer ld) {
		super(ld.getClass().toString());
		getContentPane().setLayout(new BorderLayout());
		setSize(500,500);
		status = new TextField("TESTING: Do not disturb!");
		myCanvas = new GridCanvas(ld,status);
		getContentPane().add(myCanvas,BorderLayout.CENTER);
		getContentPane().add(status,BorderLayout.SOUTH);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);	
		show();
		myCanvas.test();	
	}
	
	public void closetest() {
		dispose();
	}	
	
}